package com.oracle.containers.queue;

import java.util.concurrent.PriorityBlockingQueue;

/**
 * @author zhouyanxiang
 * @create 2020-08-2020/8/16-22:48
 */
public class PriorityBlockingQueueReview {

    public static void main(String[] args) {

            PriorityBlockingQueue <String> q = new PriorityBlockingQueue<>();
            q.add("c");
            q.add("e");
            q.add("a");
            q.add("d");
            q.add("z");
            for (int i = 0; i < 5; i++) {
                System.out.println(q.poll());
            }

        }


}
